package com.dmw.month_lx.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dmw.month_lx.entity.Organization;
import com.dmw.month_lx.entity.PayBill;
import com.dmw.month_lx.entity.User;

public interface PayBillDao {

	//添加发薪单表
	int insertPayBill(PayBill bill);
	
	//添加发薪人员表
	int insertUser(User user);
	
	//添加中间表
	int insertBillUser(@Param("pid")Integer pId,@Param("uid")Integer uId);
	
	//通过名字查询是否有这个人员
	User selectUserByName(String name);
	
	//查询组织架构表
	List<Organization> selectOrganization(Organization organ);
	
	//列表查询
	List<PayBill> selectPayBill(PayBill bill);
	
	//删除中间表
	int deleteBillUser(Integer id);
	
	//删除从表
	int deleteUser(Integer id);
	
	//删除主表
	int deletePayBill(Integer id);

	//根据id查询
	PayBill selectPayBillById(Integer id);
	
	//修改主表
	int updatePayBill(PayBill bill);
}
